<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* 
        for(初始化条件；判断条件；变化条件){
            循环体；
        }
        */
        let num = prompt('需要洗几遍衣服？');
        for (i = 0; i < 3; i++) {
            console.log('已经洗了' + num + "遍");
        }
    </script>
</body>

</html>